#ifndef __HAVE_TYPES_H
#define __HAVE_TYPES_H

typedef int size_t;

typedef unsigned char	    _u8;
typedef unsigned short	    _u16;
typedef unsigned int	    _u32;

#ifdef WIN32
typedef unsigned __int64    _u64;
#else
typedef unsigned long long  _u64;
#endif /* WIN32 */

typedef signed char	    _s8;
typedef signed short	    _s16;
typedef signed int	    _s32;

typedef char                _8;

#ifdef WIN32
typedef signed __int64      _s64;
#else
typedef signed long long    _s64;
#endif /* WIN32 */

struct registers
{
  _u32 gs, fs, es, ds;
  _u32 edi, esi, ebp, esp, ebx, edx, ecx, eax;
  _u32 int_no, err_code;
  _u32 eip, cs, eflags, useresp, ss;
};

typedef struct multiboot_memory_map
{
  _u32 size;
  _u32 base_addr_low;
  _u32 base_addr_high;
  _u32 length_low;
  _u32 length_high;
  _u32 type;
} multiboot_memory_map_t;

/* The symbol table for a.out. */
typedef struct aout_symbol_table
{
  _u32 tabsize;
  _u32 strsize;
  _u32 addr;
  _u32 reserved;
} aout_symbol_table_t;

/* The section header table for ELF. */
typedef struct elf_section_header_table
{
  _u32 num;
  _u32 size;
  _u32 addr;
  _u32 shndx;
} elf_section_header_table_t;

/* The Multiboot information. */
typedef struct multiboot_info
{
  _u32 flags;
  _u32 mem_lower;
  _u32 mem_upper;
  _u32 boot_device;
  _u32 cmdline;
  _u32 mods_count;
  _u32 mods_addr;
  union
  {
    aout_symbol_table_t aout_sym;
    elf_section_header_table_t elf_sec;
  } u;
  _u32 mmap_length;
  _u32 mmap_addr;
} multiboot_info_t;

#endif /* __HAVE_TYPES_H */
